Skip to content

Avoid unnecessary new_adt/new_fn_def calls. #144425

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 27, 2025

Conversation

nnethercote
Copy link
Contributor

They can be skipped if there are no arguments, avoiding the "relate" operation work and also the subsequent interning.

r? @ghost

They can be skipped if there are no arguments, avoiding the "relate"
operation work and also the subsequent interning.
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 24, 2025
@nnethercote
Copy link
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Jul 25, 2025

⌛ Trying commit 9d57f5e with merge 848ae35

To cancel the try build, run the command @bors try cancel.

rust-bors bot added a commit that referenced this pull request Jul 25, 2025
Avoid unnecessary `new_adt`/`new_fn_def` calls.
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 25, 2025
@Kobzol
Copy link
Member

Kobzol commented Jul 25, 2025

Seems like a webhook was lost :/ We'll have to implement some recovery from this in new bors.

@bors try

rust-bors bot added a commit that referenced this pull request Jul 25, 2025
Avoid unnecessary `new_adt`/`new_fn_def` calls.
@rust-bors
Copy link

rust-bors bot commented Jul 25, 2025

⌛ Trying commit 9d57f5e with merge 1090b05

To cancel the try build, run the command @bors try cancel.

@rust-bors
Copy link

rust-bors bot commented Jul 25, 2025

☀️ Try build successful (CI)
Build commit: 1090b05 (1090b05581acd12229e72c0ffcc8eca4a0d6a7f3, parent: b56aaec52bc0fa35591a872fb4aac81f606e265c)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (1090b05): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.3% [-0.5%, -0.1%] 61
Improvements ✅
(secondary)
-0.6% [-1.6%, -0.1%] 53
All ❌✅ (primary) -0.3% [-0.5%, -0.1%] 61

Max RSS (memory usage)

Results (primary -0.5%, secondary -3.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
1.0% [1.0%, 1.0%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.1% [-2.1%, -2.1%] 1
Improvements ✅
(secondary)
-3.2% [-4.5%, -1.9%] 2
All ❌✅ (primary) -0.5% [-2.1%, 1.0%] 2

Cycles

Results (secondary -0.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.9% [3.9%, 3.9%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.2% [-2.8%, -1.2%] 3
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 469.891s -> 468.901s (-0.21%)
Artifact size: 374.63 MiB -> 374.64 MiB (0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 25, 2025
Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me if you want to take this out of draft.

@nnethercote nnethercote marked this pull request as ready for review July 25, 2025 23:18
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 25, 2025
@nnethercote
Copy link
Contributor Author

@bors r=compiler-errors

@bors
Copy link
Collaborator

bors commented Jul 25, 2025

📌 Commit 9d57f5e has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 25, 2025
@bors
Copy link
Collaborator

bors commented Jul 27, 2025

⌛ Testing commit 9d57f5e with merge 4b596bb...

@bors
Copy link
Collaborator

bors commented Jul 27, 2025

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing 4b596bb to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 27, 2025
@bors bors merged commit 4b596bb into rust-lang:master Jul 27, 2025
12 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 27, 2025
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing edc3841 (parent) -> 4b596bb (this PR)

Test differences

Show 3 test diffs

3 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 4b596bbd847672da87763b76171687d3544863c2 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-apple-2: 6344.8s -> 4935.2s (-22.2%)
  2. x86_64-apple-1: 6676.8s -> 7902.8s (18.4%)
  3. pr-check-1: 1511.5s -> 1786.7s (18.2%)
  4. pr-check-2: 2274.6s -> 2654.7s (16.7%)
  5. i686-gnu-2: 5314.7s -> 6089.4s (14.6%)
  6. aarch64-gnu-llvm-19-1: 3397.6s -> 3867.7s (13.8%)
  7. dist-apple-various: 7369.0s -> 8220.5s (11.6%)
  8. x86_64-gnu-tools: 3410.9s -> 3797.0s (11.3%)
  9. x86_64-rust-for-linux: 2671.9s -> 2966.9s (11.0%)
  10. aarch64-msvc-2: 5053.7s -> 5589.3s (10.6%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (4b596bb): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.4% [0.4%, 0.5%] 6
Regressions ❌
(secondary)
0.5% [0.3%, 0.7%] 9
Improvements ✅
(primary)
-0.3% [-0.5%, -0.1%] 46
Improvements ✅
(secondary)
-0.7% [-1.6%, -0.1%] 44
All ❌✅ (primary) -0.2% [-0.5%, 0.5%] 52

Max RSS (memory usage)

Results (primary -1.2%, secondary -2.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.9% [0.9%, 0.9%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.2% [-3.0%, -1.4%] 2
Improvements ✅
(secondary)
-2.3% [-2.3%, -2.3%] 1
All ❌✅ (primary) -1.2% [-3.0%, 0.9%] 3

Cycles

Results (primary 2.2%, secondary -2.5%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.2% [2.2%, 2.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.5% [-2.5%, -2.5%] 1
All ❌✅ (primary) 2.2% [2.2%, 2.2%] 1

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 469.387s -> 466.325s (-0.65%)
Artifact size: 376.71 MiB -> 376.81 MiB (0.03%)

@rustbot rustbot added the perf-regression Performance regression. label Jul 27, 2025
@nnethercote nnethercote deleted the avoid-new_adt-new_fn_def branch July 27, 2025 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants